package com.GourmetDataBase;

import java.io.IOException;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class ObtenerConexion {
	
	Context context;
	//Luis polo

	public ObtenerConexion(Context context){
		this.context=context;
	}
	
	public  SQLiteDatabase getsqliteDatabase(){
		
		GourmetDatabaseHelper myDbHelper=null;
		SQLiteDatabase db = null;
		try {
		 myDbHelper = new GourmetDatabaseHelper(context);
		 myDbHelper.createDataBase();
		 myDbHelper.openDataBase();
		  db = myDbHelper.getWritableDatabase();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return db;
	}
		
}
